package com.guo.hui.eurekahystrix;

import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;


@Component
@FeignClient(name = "eureka-client", fallback = EurekaHystrixClientFallBack.class)
public interface EurekaHystrixClient {
    /**
     * 参数如果不指定传输不成功,接收值为空
     */
    @GetMapping("/hello")
    String hello(@RequestParam("name") String name);

    @GetMapping("/world")
    String world(@RequestParam("name") String name, @RequestParam("kk") Integer kk);

    @GetMapping("/dc")
    String dc();

}
